**********************************************************************************************************
*** Replication file for: Measuring the Impact of LGBTQ Activism on Backlash in the Former Eastern Bloc **
** Author: 			  	  Alex Chen																		**
** Date: 				  31 October 2022																**
**********************************************************************************************************




**********************************************************************************************
************* Generating Short (SR) and Long-Term (LR) Event Dummy Variables *****************
************************ (for use in Regression Groups 1a, 2a) *******************************
*********************************************************************************************


* Generating event dummies per country *
********************************************************************************

gen e_ukr_SR = 0
	replace e_ukr_SR = 1 if coun_name == "Ukraine" & ((year == 2017 & month >=6) | (year == 2018 & month <=5))
	replace e_ukr_SR = 1 if coun_name == "Moldova" & ((year == 2017 & month >=6) | (year == 2018 & month <=5))
	
gen e_geo_SR = 0
	replace e_geo_SR = 1 if coun_name == "Georgia" & ((year == 2018 & month >=5) | (year == 2019 & month <=4))
	replace e_geo_SR = 1 if coun_name == "Armenia" & ((year == 2018 & month >=5) | (year == 2019 & month <=4))
	
gen e_kgz_SR = 0
	replace e_kgz_SR = 1 if coun_name == "Kyrgyzstan" & ((year == 2019 & month >=3) | (year == 2020 & month <=2))
		
gen e_pol_SR = 0
	replace e_pol_SR = 1 if coun_name == "Poland" & ((year == 2018 & month >=6) | (year == 2019 & month <=5))
	replace e_pol_SR = 1 if coun_name == "Germany" & ((year == 2018 & month >=6) | (year == 2019 & month <=5))
	
gen e_srb_SR = 0
	replace e_srb_SR = 1 if coun_name == "Serbia" & ((year == 2017 & month >=9) | (year == 2018 & month <=8))
	replace e_srb_SR = 1 if coun_name == "Bosnia and Herzegovina" & ((year == 2017 & month >=9) | (year == 2018 & month <=8))

gen e_ukr_LR = 0
	replace e_ukr_LR = 1 if coun_name == "Ukraine" & ((year == 2017 & month >=6) | year == 2018 | year == 2019 | year == 2020)
	replace e_ukr_LR = 1 if coun_name == "Moldova" & ((year == 2017 & month >=6) | year == 2018 | year == 2019 | year == 2020)
	
gen e_geo_LR = 0
	replace e_geo_LR = 1 if coun_name == "Georgia" & ((year == 2018 & month >=5) | year == 2019 | year == 2020)
	replace e_geo_LR = 1 if coun_name == "Armenia" & ((year == 2018 & month >=5) | year == 2019 | year == 2020)

gen e_kgz_LR = 0
	replace e_kgz_LR = 1 if coun_name == "Kyrgyzstan" & year == ((year == 2019 & month >=3) | year == 2020)
	
gen e_pol_LR = 0
	replace e_pol_LR = 1 if coun_name == "Poland" & ((year == 2018 & month >=6) | year == 2019 | year == 2020)
	replace e_pol_LR = 1 if coun_name == "Germany" & ((year == 2018 & month >=6) | year == 2019 | year == 2020)
	
gen e_srb_LR = 0
	replace e_srb_LR = 1 if coun_name == "Serbia" & ((year == 2017 & month >=9) | year == 2018 | year == 2019 | year == 2020)
	replace e_srb_LR = 1 if coun_name == "Bosnia and Herzegovina" & ((year == 2017 & month >=9) | year == 2018 | year == 2019 | year == 2020)
	
gen e_lgbt = 0
	replace e_lgbt = 1 if coun_name != "Russia" 
	
	
* Generating collapsed event dummies *
********************************************************************************
gen e_lgbt_SR = 0
	replace e_lgbt_SR = 1 if coun_name == "Ukraine" & ((year == 2017 & month >=6) | (year == 2018 & month <=5))
	replace e_lgbt_SR = 1 if coun_name == "Moldova" & ((year == 2017 & month >=6) | (year == 2018 & month <=5))	
	replace e_lgbt_SR = 1 if coun_name == "Georgia" & ((year == 2018 & month >=5) | (year == 2019 & month <=4))
	replace e_lgbt_SR = 1 if coun_name == "Armenia" & ((year == 2018 & month >=5) | (year == 2019 & month <=4))	
	replace e_lgbt_SR = 1 if coun_name == "Kyrgyzstan" & ((year == 2019 & month >=3) | (year == 2020 & month <=2))
	replace e_lgbt_SR = 1 if coun_name == "Bosnia and Herzegovina" & ((year == 2017 & month >=9) | (year == 2018 & month <=8))
	replace e_lgbt_SR = 1 if coun_name == "Germany" & ((year == 2018 & month >=6) | (year == 2019 & month <=5))
	replace e_lgbt_SR = 1 if coun_name == "Poland" & ((year == 2018 & month >=6) | (year == 2019 & month <=5))
	replace e_lgbt_SR = 1 if coun_name == "Serbia" & ((year == 2017 & month >=9) | (year == 2018 & month <=8))
	
gen e_lgbt_LR = 0
	replace e_lgbt_LR = 1 if coun_name == "Ukraine" & ((year == 2017 & month >=6) | year == 2018 | year == 2019 | year == 2020)
	replace e_lgbt_LR = 1 if coun_name == "Moldova" & ((year == 2017 & month >=6) | year == 2018 | year == 2019 | year == 2020)	
	replace e_lgbt_LR = 1 if coun_name == "Georgia" & ((year == 2018 & month >=5) | year == 2019 | year == 2020)
	replace e_lgbt_LR = 1 if coun_name == "Armenia" & ((year == 2018 & month >=5) | year == 2019 | year == 2020)	
	replace e_lgbt_LR = 1 if coun_name == "Kyrgyzstan" & ((year == 2019 & month >=3) | year == 2020)
	replace e_lgbt_LR = 1 if coun_name == "Bosnia and Herzegovina" & ((year == 2017 & month >=9) | year == 2018 | year == 2019 | year == 2020)
	replace e_lgbt_LR = 1 if coun_name == "Germany" & ((year == 2018 & month >=6) | year == 2019 | year == 2020)
	replace e_lgbt_LR = 1 if coun_name == "Poland" & ((year == 2018 & month >=6) | year == 2019 | year == 2020)
	replace e_lgbt_LR = 1 if coun_name == "Serbia" & ((year == 2017 & month >=9) | year == 2018 | year == 2019 | year == 2020)


sort coun_name year month_id
order media_v, a(month_id)
*/




**********************************************************************************************
************************ Primary Regressions (Four Regression Groups), ***********************
***************************** including Tables B1–B4, C1–C4 **********************************
*********************************************************************************************


* Regression Group 1a ; Tables B1 and C1 *
********************************************************************************
	
use "LGBTQ_Activism_and_Backlash", clear
drop if year == 2020 // for consistency across data sources
xtset coun_id month_id

* 1 *
xi: xtreg whc e_lgbt_SR i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe
eststo  
outreg2 using "reg_1a.tex", replace drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES) alpha(0.01, 0.05, 0.10) 

* 2 *
xi: xtreg whc e_lgbt_SR i.month_id v2x_freexp_altinf v2x_gencs, fe
eststo  
outreg2 using "reg_1a.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

* 3 *
xi: xtreg whc e_lgbt_SR i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe
eststo  
outreg2 using "reg_1a.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES) 

* 4 *
xi: xtreg whc e_lgbt_SR e_lgbt_LR i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe
eststo  
outreg2 using "reg_1a.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

* 5 *
xi: xtreg whc e_lgbt_SR e_lgbt_LR i.month_id v2x_freexp_altinf v2x_gencs, fe
eststo   
outreg2 using "reg_1a.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

* 6, Table C1 *
xi: xtreg whc e_lgbt_SR e_lgbt_LR i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe
eststo 
outreg2 using "reg_1a.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES) 

esttab, r2 ar2 se scalar(rmse) eform drop(_Imonth_id*)
eststo clear

* Table B1 *
sum whc e_lgbt_SR e_lgbt_LR
outreg2 using "sumstats_1a.tex", replace sum(log) keep(whc e_lgbt_SR e_lgbt_LR v2x_freexp_altinf v2csprtcpt v2clacjstw v2x_gencs v2x_clphy)



* Regression Group 1b ; Tables B2 and C2 *
********************************************************************************

use "LGBTQ_Activism_and_Backlash", clear
drop if year == 2020 // for consistency across data sources
xtset coun_id month_id

* 1 *
xi: xtreg whc media_a i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe
eststo 
outreg2 using "reg_1b.tex", replace drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES) alpha(0.01, 0.05, 0.10) 

* 2 *
xi: xtreg whc media_a i.month_id v2x_freexp_altinf v2x_gencs, fe
eststo 
outreg2 using "reg_1b.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

* 3 *
xi: xtreg whc media_a i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe
eststo 
outreg2 using "reg_1b.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES) 

* 4 *	
xi: xtreg whc media_a media_a_lg12 i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe
eststo 
outreg2 using "reg_1b.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

* 5 *
xi: xtreg whc media_a media_a_lg12 i.month_id v2x_freexp_altinf v2x_gencs, fe
eststo 
outreg2 using "reg_1b.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

* 6, Table C2 *
xi: xtreg whc media_a media_a_lg12 i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe
eststo 
outreg2 using "reg_1b.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

esttab, r2 ar2 se scalar(rmse) eform drop(_Imonth_id*)
eststo clear

* Table B2 *
sum whc media_a media_a_lg12
outreg2 using "sumstats_1b.tex", replace sum(log) keep(whc media_a media_a_lg12 v2x_freexp_altinf v2csprtcpt v2clacjstw v2x_gencs v2x_clphy)



* Regression Group 2a ; Tables B3 and C3 *
********************************************************************************

use "LGBTQ_Activism_and_Backlash", clear
xtset coun_id month_id

* 1 *
xi: xtreg media_v e_lgbt_SR i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe
eststo 
outreg2 using "reg_2a.tex", replace drop(_Imonth_id*) addtext(Fixed Effects, YES,  Media, YES, Civil Society, YES, Women, YES) alpha(0.01, 0.05, 0.10)

* 2 *
xi: xtreg media_v e_lgbt_SR i.month_id v2x_freexp_altinf v2x_gencs, fe
eststo 
outreg2 using "reg_2a.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES,  Media, YES, Civil Society, YES, Women, YES)

* 3 *
xi: xtreg media_v e_lgbt_SR i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe
eststo 
outreg2 using "reg_2a.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES,  Media, YES, Civil Society, YES, Women, YES) 

* 4 *	
xi: xtreg media_v e_lgbt_SR e_lgbt_LR i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe
eststo 
outreg2 using "reg_2a.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES,  Media, YES, Civil Society, YES, Women, YES)

* 5 *
xi: xtreg media_v e_lgbt_SR e_lgbt_LR i.month_id v2x_freexp_altinf v2x_gencs, fe
eststo 
outreg2 using "reg_2a.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES,  Media, YES, Civil Society, YES, Women, YES)

* 6, Table C3 *
xi: xtreg media_v e_lgbt_SR e_lgbt_LR i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe
eststo 
outreg2 using "reg_2a.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES,  Media, YES, Civil Society, YES, Women, YES)

esttab, r2 ar2 se scalar(rmse) eform drop(_Imonth_id*)
eststo clear

* Table B3 *
sum media_v e_lgbt_SR e_lgbt_LR
outreg2 using "sumstats_2a.tex", replace sum(log) keep(media_v e_lgbt_SR e_lgbt_LR v2x_freexp_altinf v2csprtcpt v2clacjstw v2x_gencs v2x_clphy)



* Regression Group 2b ; Tables B4 and C4 *
********************************************************************************

use "LGBTQ_Activism_and_Backlash", clear
xtset coun_id month_id

* 1 *
xi: xtreg media_v media_a i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe
eststo 
outreg2 using "reg_2b.tex", replace drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES) alpha(0.01, 0.05, 0.10)


* 2 *
xi: xtreg media_v media_a i.month_id v2x_freexp_altinf v2x_gencs, fe
eststo 
outreg2 using "reg_2b.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

* 3 *
xi: xtreg media_v media_a i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe
eststo 
outreg2 using "reg_2b.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES) 

* 4 *	
xi: xtreg media_v media_a media_a_lg12 i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe
eststo 
outreg2 using "reg_2b.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

* 5 *
xi: xtreg media_v media_a media_a_lg12 i.month_id v2x_freexp_altinf v2x_gencs, fe
eststo 
outreg2 using "reg_2b.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

* 6, Table C4 *
xi: xtreg media_v media_a media_a_lg12 i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe
eststo 
outreg2 using "reg_2b.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES) 

esttab, r2 ar2 se scalar(rmse) eform drop(_Imonth_id*)
eststo clear

* Table B4 *
sum media_v media_a media_a_lg12
outreg2 using "sumstats_2b.tex", replace sum(log) keep(media_v media_a media_a_lg12 v2x_freexp_altinf v2csprtcpt v2clacjstw v2x_gencs v2x_clphy)
*/




**********************************************************************************************
*************************** Placebo Test: Reverse Causality  *********************************
*********************** Generating Leads and Lags of Variables *******************************
*********************************************************************************************


use "LGBTQ_Activism_and_Backlash", clear  
drop media_a_lg12 


* Generating 15 leads of event dummy *
********************************************************************************

forvalues p == 1/15 {
	gen e_SR_`p' = 0
		replace e_SR_`p' = 1 if (coun_name == "Armenia"|coun_name == "Georgia") & inrange(month_id,29-`p',40-`p')
		replace e_SR_`p' = 1 if (coun_name == "Kyrgyzstan") & inrange(month_id,39-`p', 50-`p')
		replace e_SR_`p' = 1 if (coun_name == "Ukraine"|coun_name == "Moldova") & inrange(month_id,18-`p',29-`p')
		replace e_SR_`p' = 1 if (coun_name == "Poland"|coun_name == "Germany") & inrange(month_id,30-`p',41-`p')
		replace e_SR_`p' = 1 if (coun_name == "Bosnia and Herzegovina"|coun_name == "Serbia") & inrange(month_id,21-`p',32-`p')
}

	
forvalues p == 1/15 {
	gen e_LR_`p' = 0
		replace e_LR_`p' = 1 if (coun_name == "Armenia"|coun_name == "Georgia") & inrange(month_id,29-`p',60)
		replace e_LR_`p' = 1 if (coun_name == "Kyrgyzstan") & inrange(month_id,39-`p',60)
		replace e_LR_`p' = 1 if (coun_name == "Ukraine"|coun_name == "Moldova") & inrange(month_id,18-`p',60)
		replace e_LR_`p' = 1 if (coun_name == "Poland"|coun_name == "Germany") & inrange(month_id,30-`p',60)
		replace e_LR_`p' = 1 if (coun_name == "Bosnia and Herzegovina"|coun_name == "Serbia") & inrange(month_id,21-`p',60)
}
		

* Generating 15 lags of event dummy *
********************************************************************************

forvalues p == 1/15 {
	gen e_SR_`p'l = 0
		replace e_SR_`p'l = 1 if (coun_name == "Armenia"|coun_name == "Georgia") & inrange(month_id,29+`p',40+`p')
		replace e_SR_`p'l = 1 if (coun_name == "Kyrgyzstan") & inrange(month_id,39+`p',50+`p')
		replace e_SR_`p'l = 1 if (coun_name == "Ukraine"|coun_name == "Moldova") & inrange(month_id,18+`p',29+`p')
		replace e_SR_`p'l = 1 if (coun_name == "Poland"|coun_name == "Germany") & inrange(month_id,30+`p',41+`p')
		replace e_SR_`p'l = 1 if (coun_name == "Bosnia and Herzegovina"|coun_name == "Serbia") & inrange(month_id,21+`p',32+`p')
}

forvalues p == 1/15 {
	gen e_LR_`p'l = 0
		replace e_LR_`p'l = 1 if (coun_name == "Armenia"|coun_name == "Georgia") & inrange(month_id,29+`p',60)
		replace e_LR_`p'l = 1 if (coun_name == "Kyrgyzstan") & inrange(month_id,39+`p',60)
		replace e_LR_`p'l = 1 if (coun_name == "Ukraine"|coun_name == "Moldova") & inrange(month_id,18+`p',60)
		replace e_LR_`p'l = 1 if (coun_name == "Poland"|coun_name == "Germany") & inrange(month_id,30+`p',60)
		replace e_LR_`p'l = 1 if (coun_name == "Bosnia and Herzegovina"|coun_name == "Serbia") & inrange(month_id,21+`p',60)
}

order e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l e_LR_15 e_LR_14 e_LR_13 e_LR_12 e_LR_11 e_LR_10 e_LR_9 e_LR_8 e_LR_7 e_LR_6 e_LR_5 e_LR_4 e_LR_3 e_LR_2 e_LR_1 e_LR_1l e_LR_2l e_LR_3l e_LR_4l e_LR_5l e_LR_6l e_LR_7l e_LR_8l e_LR_9l e_LR_10l e_LR_11l e_LR_12l e_LR_13l e_LR_14l e_LR_15l, a(e_lgbt)	


	
* Generating 15 leads of media_a *
********************************************************************************

foreach coun in coun_name  {
	forvalues p == 1/15 {
		gen media_a_ld`p' = media_a
		replace media_a_ld`p' = media_a[_n+`p'] 
	}	
}


* Generating 15 lags of media_a *
********************************************************************************

foreach coun in coun_name  {
	forvalues p == 1/15 {
		gen media_a_lg`p' = media_a
		replace media_a_lg`p' = media_a[_n-`p'] 
	}	
}

order whc media_a_ld1-media_a_ld15 media_a media_a_lg1-media_a_lg15, a(month_id)
*/



* Save as extended dta file *
********************************************************************************
save "LGBTQ_Activism_and_Backlash_extended", replace



**********************************************************************************************
***************** Placebo Test: Reverse Causality – Regression Group 1a **********************
*********************** including Tables D1–D30; Figures A1–A2 *******************************
*********************************************************************************************

	
use "LGBTQ_Activism_and_Backlash_extended", clear  // dta file generated in previous section
drop if year == 2020 // for consistency across data sources
xtset coun_id month_id

	
* Reg 1 *
**************

forvalues p == 1/15 {
	xi: xtreg whc e_SR_`p'l i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe 
	eststo e_`p'l
	outreg2 using "e_`p'l.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

	xi: xtreg whc e_lgbt_SR i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe    // ORIGINAL
	eststo e_lgbt
	outreg2 using "e_lgbt.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg whc e_SR_`p' i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe 
	eststo e_`p'
	outreg2 using "e_`p'.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}


* Figure A1 (a) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2csprtcpt v2clacjstw) nokey vertical yline(0) order(e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l ) coeflabels(e_lgbt_SR="0" e_SR_1 ="-1" e_SR_2="-2" e_SR_3="-3" e_SR_4="-4" e_SR_5="-5" e_SR_6="-6" e_SR_7="-7" e_SR_8="-8" e_SR_9="-9" e_SR_10="-10" e_SR_11="-11" e_SR_12="-12" e_SR_13="-13" e_SR_14="-14" e_SR_15="-15" e_SR_1l="1" e_SR_2l="2" e_SR_3l="3" e_SR_4l="4" e_SR_5l="5" e_SR_6l="6" e_SR_7l="7" e_SR_8l="8" e_SR_9l="9" e_SR_10l="10" e_SR_11l="11" e_SR_12l="12" e_SR_13l="13" e_SR_14l="14" e_SR_15l="15", labsize(small))  xtitle(Lags of e_lgbt_SR) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)

graph export "graph_reg_1aE1_P.jpg", replace




* Reg 2 *
**************

forvalues p == 1/15 {
	xi: xtreg whc e_SR_`p'l i.month_id v2x_freexp_altinf v2x_gencs, fe   
	eststo e_`p'l
	outreg2 using "e_`p'l.tex", append ctitle(Reg 2) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg whc e_lgbt_SR i.month_id v2x_freexp_altinf v2x_gencs, fe    // ORIGINAL
	eststo e_lgbt
	outreg2 using "e_lgbt.tex",  append ctitle(Reg 2) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

	xi: xtreg whc e_SR_`p' i.month_id v2x_freexp_altinf v2x_gencs, fe 
	eststo e_`p'
	outreg2 using "e_`p'.tex", append ctitle(Reg 2) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}


* Figure A1 (b) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs) nokey vertical yline(0) order(e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l ) coeflabels(e_lgbt_SR="0" e_SR_1 ="-1" e_SR_2="-2" e_SR_3="-3" e_SR_4="-4" e_SR_5="-5" e_SR_6="-6" e_SR_7="-7" e_SR_8="-8" e_SR_9="-9" e_SR_10="-10" e_SR_11="-11" e_SR_12="-12" e_SR_13="-13" e_SR_14="-14" e_SR_15="-15" e_SR_1l="1" e_SR_2l="2" e_SR_3l="3" e_SR_4l="4" e_SR_5l="5" e_SR_6l="6" e_SR_7l="7" e_SR_8l="8" e_SR_9l="9" e_SR_10l="10" e_SR_11l="11" e_SR_12l="12" e_SR_13l="13" e_SR_14l="14" e_SR_15l="15", labsize(small)) xtitle(Lags of e_lgbt_SR) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)  

graph export "graph_reg_1aE2_P.jpg", replace




* Reg 3 *
**************

forvalues p == 1/15 {
	xi: xtreg whc e_SR_`p'l i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe    
	eststo e_`p'l
	outreg2 using "e_`p'l.tex", append ctitle(Reg 3) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg whc e_lgbt_SR i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe    // ORIGINAL
eststo e_lgbt
outreg2 using "e_lgbt.tex",  append ctitle(Reg 3) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

	xi: xtreg whc e_SR_`p' i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe 
	eststo e_`p'
	outreg2 using "e_`p'.tex", append ctitle(Reg 3) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}

* Figure A1 (c) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs v2x_clphy) nokey vertical yline(0) order(e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l ) coeflabels(e_lgbt_SR="0" e_SR_1 ="-1" e_SR_2="-2" e_SR_3="-3" e_SR_4="-4" e_SR_5="-5" e_SR_6="-6" e_SR_7="-7" e_SR_8="-8" e_SR_9="-9" e_SR_10="-10" e_SR_11="-11" e_SR_12="-12" e_SR_13="-13" e_SR_14="-14" e_SR_15="-15" e_SR_1l="1" e_SR_2l="2" e_SR_3l="3" e_SR_4l="4" e_SR_5l="5" e_SR_6l="6" e_SR_7l="7" e_SR_8l="8" e_SR_9l="9" e_SR_10l="10" e_SR_11l="11" e_SR_12l="12" e_SR_13l="13" e_SR_14l="14" e_SR_15l="15", labsize(small))  xtitle(Lags of e_lgbt_SR) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white) 

graph export "graph_reg_1aE3_P.jpg", replace




* Reg 4 *
**************

forvalues p == 1/15 {
	xi: xtreg whc e_SR_`p'l e_LR_`p'l i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe 
	eststo e_`p'l
	outreg2 using "e_`p'l.tex", append ctitle(Reg 4) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg whc e_lgbt_SR e_lgbt_LR i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe    // ORIGINAL
	eststo e_lgbt
	outreg2 using "e_lgbt.tex",  append ctitle(Reg 4) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg whc e_SR_`p' e_LR_`p' i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe 
	eststo e_`p'
	outreg2 using "e_`p'.tex", append ctitle(Reg 4) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}


* Figure A1 (d) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2csprtcpt v2clacjstw e_LR_15 e_LR_14 e_LR_13 e_LR_12 e_LR_11 e_LR_10 e_LR_9 e_LR_8 e_LR_7 e_LR_6 e_LR_5 e_LR_4 e_LR_3 e_LR_2 e_LR_1 e_lgbt_LR e_LR_1l e_LR_2l e_LR_3l e_LR_4l e_LR_5l e_LR_6l e_LR_7l e_LR_8l e_LR_9l e_LR_10l e_LR_11l e_LR_12l e_LR_13l e_LR_14l e_LR_15l) nokey vertical yline(0) order(e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l ) coeflabels(e_lgbt_SR="0" e_SR_1 ="-1" e_SR_2="-2" e_SR_3="-3" e_SR_4="-4" e_SR_5="-5" e_SR_6="-6" e_SR_7="-7" e_SR_8="-8" e_SR_9="-9" e_SR_10="-10" e_SR_11="-11" e_SR_12="-12" e_SR_13="-13" e_SR_14="-14" e_SR_15="-15" e_SR_1l="1" e_SR_2l="2" e_SR_3l="3" e_SR_4l="4" e_SR_5l="5" e_SR_6l="6" e_SR_7l="7" e_SR_8l="8" e_SR_9l="9" e_SR_10l="10" e_SR_11l="11" e_SR_12l="12" e_SR_13l="13" e_SR_14l="14" e_SR_15l="15", labsize(small))  xtitle(Lags of e_lgbt_SR) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)  

graph export "graph_reg_1aE4_SR_P.jpg", replace


* Figure A2 (a) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2csprtcpt v2clacjstw e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l) nokey vertical yline(0) order(e_LR_15 e_LR_14 e_LR_13 e_LR_12 e_LR_11 e_LR_10 e_LR_9 e_LR_8 e_LR_7 e_LR_6 e_LR_5 e_LR_4 e_LR_3 e_LR_2 e_LR_1 e_lgbt_LR e_LR_1l e_LR_2l e_LR_3l e_LR_4l e_LR_5l e_LR_6l e_LR_7l e_LR_8l e_LR_9l e_LR_10l e_LR_11l e_LR_12l e_LR_13l e_LR_14l e_LR_15l ) coeflabels(e_lgbt_LR="0" e_LR_1 ="-1" e_LR_2="-2" e_LR_3="-3" e_LR_4="-4" e_LR_5="-5" e_LR_6="-6" e_LR_7="-7" e_LR_8="-8" e_LR_9="-9" e_LR_10="-10" e_LR_11="-11" e_LR_12="-12" e_LR_13="-13" e_LR_14="-14" e_LR_15="-15" e_LR_1l="1" e_LR_2l="2" e_LR_3l="3" e_LR_4l="4" e_LR_5l="5" e_LR_6l="6" e_LR_7l="7" e_LR_8l="8" e_LR_9l="9" e_LR_10l="10" e_LR_11l="11" e_LR_12l="12" e_LR_13l="13" e_LR_14l="14" e_LR_15l="15", labsize(small))  xtitle(Lags of e_lgbt_LR) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)

graph export "graph_reg_1aE4_LR_P.jpg", replace




* Reg 5 *
**************

forvalues p == 1/15 {
	xi: xtreg whc e_SR_`p'l e_LR_`p'l i.month_id v2x_freexp_altinf v2x_gencs, fe 
	eststo e_`p'l
	outreg2 using "e_`p'l.tex", append ctitle(Reg 5) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg whc e_lgbt_SR e_lgbt_LR i.month_id v2x_freexp_altinf v2x_gencs, fe    // ORIGINAL
	eststo e_lgbt
	outreg2 using "e_lgbt.tex",  append ctitle(Reg 5) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg whc e_SR_`p' e_LR_`p' i.month_id v2x_freexp_altinf v2x_gencs, fe 
	eststo e_`p'
	outreg2 using "e_`p'.tex", append ctitle(Reg 5) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}

* Figure A1 (e) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs e_LR_15 e_LR_14 e_LR_13 e_LR_12 e_LR_11 e_LR_10 e_LR_9 e_LR_8 e_LR_7 e_LR_6 e_LR_5 e_LR_4 e_LR_3 e_LR_2 e_LR_1 e_lgbt_LR e_LR_1l e_LR_2l e_LR_3l e_LR_4l e_LR_5l e_LR_6l e_LR_7l e_LR_8l e_LR_9l e_LR_10l e_LR_11l e_LR_12l e_LR_13l e_LR_14l e_LR_15l) nokey vertical yline(0) order(e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l ) coeflabels(e_lgbt_SR="0" e_SR_1 ="-1" e_SR_2="-2" e_SR_3="-3" e_SR_4="-4" e_SR_5="-5" e_SR_6="-6" e_SR_7="-7" e_SR_8="-8" e_SR_9="-9" e_SR_10="-10" e_SR_11="-11" e_SR_12="-12" e_SR_13="-13" e_SR_14="-14" e_SR_15="-15" e_SR_1l="1" e_SR_2l="2" e_SR_3l="3" e_SR_4l="4" e_SR_5l="5" e_SR_6l="6" e_SR_7l="7" e_SR_8l="8" e_SR_9l="9" e_SR_10l="10" e_SR_11l="11" e_SR_12l="12" e_SR_13l="13" e_SR_14l="14" e_SR_15l="15", labsize(small)) xtitle(Lags of e_lgbt_SR) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)  

graph export "graph_reg_1aE5_SR_P.jpg", replace


* Figure A2 (b) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l) nokey vertical yline(0) order(e_LR_15 e_LR_14 e_LR_13 e_LR_12 e_LR_11 e_LR_10 e_LR_9 e_LR_8 e_LR_7 e_LR_6 e_LR_5 e_LR_4 e_LR_3 e_LR_2 e_LR_1 e_lgbt_LR e_LR_1l e_LR_2l e_LR_3l e_LR_4l e_LR_5l e_LR_6l e_LR_7l e_LR_8l e_LR_9l e_LR_10l e_LR_11l e_LR_12l e_LR_13l e_LR_14l e_LR_15l ) coeflabels(e_lgbt_LR="0" e_LR_1 ="-1" e_LR_2="-2" e_LR_3="-3" e_LR_4="-4" e_LR_5="-5" e_LR_6="-6" e_LR_7="-7" e_LR_8="-8" e_LR_9="-9" e_LR_10="-10" e_LR_11="-11" e_LR_12="-12" e_LR_13="-13" e_LR_14="-14" e_LR_15="-15" e_LR_1l="1" e_LR_2l="2" e_LR_3l="3" e_LR_4l="4" e_LR_5l="5" e_LR_6l="6" e_LR_7l="7" e_LR_8l="8" e_LR_9l="9" e_LR_10l="10" e_LR_11l="11" e_LR_12l="12" e_LR_13l="13" e_LR_14l="14" e_LR_15l="15", labsize(small)) xtitle(Lags of e_lgbt_LR) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)  

graph export "graph_reg_1aE5_LR_P.jpg", replace




* Reg 6 *
**************

forvalues p == 1/15 {
	xi: xtreg whc e_SR_`p'l e_LR_`p'l i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe 
	eststo e_`p'l
	outreg2 using "e_`p'l.tex", append ctitle(Reg 6) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg whc e_lgbt_SR e_lgbt_LR i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe    // ORIGINAL
	eststo e_lgbt
	outreg2 using "e_lgbt.tex",  append ctitle(Reg 6) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg whc e_SR_`p' e_LR_`p' i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe 
	eststo e_`p'
	outreg2 using "e_`p'.tex", append ctitle(Reg 6) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}

* Figure A1 (f) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs v2x_clphy e_LR_15 e_LR_14 e_LR_13 e_LR_12 e_LR_11 e_LR_10 e_LR_9 e_LR_8 e_LR_7 e_LR_6 e_LR_5 e_LR_4 e_LR_3 e_LR_2 e_LR_1 e_lgbt_LR e_LR_1l e_LR_2l e_LR_3l e_LR_4l e_LR_5l e_LR_6l e_LR_7l e_LR_8l e_LR_9l e_LR_10l e_LR_11l e_LR_12l e_LR_13l e_LR_14l e_LR_15l) nokey vertical yline(0) order(e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l ) coeflabels(e_lgbt_SR="0" e_SR_1 ="-1" e_SR_2="-2" e_SR_3="-3" e_SR_4="-4" e_SR_5="-5" e_SR_6="-6" e_SR_7="-7" e_SR_8="-8" e_SR_9="-9" e_SR_10="-10" e_SR_11="-11" e_SR_12="-12" e_SR_13="-13" e_SR_14="-14" e_SR_15="-15" e_SR_1l="1" e_SR_2l="2" e_SR_3l="3" e_SR_4l="4" e_SR_5l="5" e_SR_6l="6" e_SR_7l="7" e_SR_8l="8" e_SR_9l="9" e_SR_10l="10" e_SR_11l="11" e_SR_12l="12" e_SR_13l="13" e_SR_14l="14" e_SR_15l="15", labsize(small))  xtitle(Lags of e_lgbt_SR) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)

graph export "graph_reg_1aE6_SR_P.jpg", replace

* Figure A2 (c) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs v2x_clphy e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l) nokey vertical yline(0) order(e_LR_15 e_LR_14 e_LR_13 e_LR_12 e_LR_11 e_LR_10 e_LR_9 e_LR_8 e_LR_7 e_LR_6 e_LR_5 e_LR_4 e_LR_3 e_LR_2 e_LR_1 e_lgbt_LR e_LR_1l e_LR_2l e_LR_3l e_LR_4l e_LR_5l e_LR_6l e_LR_7l e_LR_8l e_LR_9l e_LR_10l e_LR_11l e_LR_12l e_LR_13l e_LR_14l e_LR_15l ) coeflabels(e_lgbt_LR="0" e_LR_1 ="-1" e_LR_2="-2" e_LR_3="-3" e_LR_4="-4" e_LR_5="-5" e_LR_6="-6" e_LR_7="-7" e_LR_8="-8" e_LR_9="-9" e_LR_10="-10" e_LR_11="-11" e_LR_12="-12" e_LR_13="-13" e_LR_14="-14" e_LR_15="-15" e_LR_1l="1" e_LR_2l="2" e_LR_3l="3" e_LR_4l="4" e_LR_5l="5" e_LR_6l="6" e_LR_7l="7" e_LR_8l="8" e_LR_9l="9" e_LR_10l="10" e_LR_11l="11" e_LR_12l="12" e_LR_13l="13" e_LR_14l="14" e_LR_15l="15", labsize(small))  xtitle(Lags of e_lgbt_LR) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)


graph export "graph_reg_1aE6_LR_P.jpg", replace
*/




**********************************************************************************************
***************** Placebo Test: Reverse Causality – Regression Group 2a **********************
*********************** including Tables D30–D60; Figures A4–A5 ******************************
*********************************************************************************************

	
use "LGBTQ_Activism_and_Backlash_extended", clear  // dta file generated above
xtset coun_id month_id

	
* Reg 1 *
**************

forvalues p == 1/15 {
	xi: xtreg media_v e_SR_`p'l i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe 
	eststo e_`p'l
	outreg2 using "e_`p'l.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

	xi: xtreg media_v e_lgbt_SR i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe    // ORIGINAL
	eststo e_lgbt
	outreg2 using "e_lgbt.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg media_v e_SR_`p' i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe 
	eststo e_`p'
	outreg2 using "e_`p'.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}


* Figure A4 (a) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2csprtcpt v2clacjstw) nokey vertical yline(0) order(e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l ) coeflabels(e_lgbt_SR="0" e_SR_1 ="-1" e_SR_2="-2" e_SR_3="-3" e_SR_4="-4" e_SR_5="-5" e_SR_6="-6" e_SR_7="-7" e_SR_8="-8" e_SR_9="-9" e_SR_10="-10" e_SR_11="-11" e_SR_12="-12" e_SR_13="-13" e_SR_14="-14" e_SR_15="-15" e_SR_1l="1" e_SR_2l="2" e_SR_3l="3" e_SR_4l="4" e_SR_5l="5" e_SR_6l="6" e_SR_7l="7" e_SR_8l="8" e_SR_9l="9" e_SR_10l="10" e_SR_11l="11" e_SR_12l="12" e_SR_13l="13" e_SR_14l="14" e_SR_15l="15", labsize(small))  xtitle(Lags of e_lgbt_SR) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)

graph export "graph_reg_2aE1_P.jpg", replace




* Reg 2 *
**************

forvalues p == 1/15 {
	xi: xtreg media_v e_SR_`p'l i.month_id v2x_freexp_altinf v2x_gencs, fe   
	eststo e_`p'l
	outreg2 using "e_`p'l.tex", append ctitle(Reg 2) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg media_v e_lgbt_SR i.month_id v2x_freexp_altinf v2x_gencs, fe    // ORIGINAL
	eststo e_lgbt
	outreg2 using "e_lgbt.tex",  append ctitle(Reg 2) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

	xi: xtreg media_v e_SR_`p' i.month_id v2x_freexp_altinf v2x_gencs, fe 
	eststo e_`p'
	outreg2 using "e_`p'.tex", append ctitle(Reg 2) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}


* Figure A4 (b) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs) nokey vertical yline(0) order(e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l ) coeflabels(e_lgbt_SR="0" e_SR_1 ="-1" e_SR_2="-2" e_SR_3="-3" e_SR_4="-4" e_SR_5="-5" e_SR_6="-6" e_SR_7="-7" e_SR_8="-8" e_SR_9="-9" e_SR_10="-10" e_SR_11="-11" e_SR_12="-12" e_SR_13="-13" e_SR_14="-14" e_SR_15="-15" e_SR_1l="1" e_SR_2l="2" e_SR_3l="3" e_SR_4l="4" e_SR_5l="5" e_SR_6l="6" e_SR_7l="7" e_SR_8l="8" e_SR_9l="9" e_SR_10l="10" e_SR_11l="11" e_SR_12l="12" e_SR_13l="13" e_SR_14l="14" e_SR_15l="15", labsize(small)) xtitle(Lags of e_lgbt_SR) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)  

graph export "graph_reg_2aE2_P.jpg", replace




* Reg 3 *
**************

forvalues p == 1/15 {
	xi: xtreg media_v e_SR_`p'l i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe    
	eststo e_`p'l
	outreg2 using "e_`p'l.tex", append ctitle(Reg 3) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg media_v e_lgbt_SR i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe    // ORIGINAL
eststo e_lgbt
outreg2 using "e_lgbt.tex",  append ctitle(Reg 3) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

	xi: xtreg media_v e_SR_`p' i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe 
	eststo e_`p'
	outreg2 using "e_`p'.tex", append ctitle(Reg 3) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}

* Figure A4 (c) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs v2x_clphy) nokey vertical yline(0) order(e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l ) coeflabels(e_lgbt_SR="0" e_SR_1 ="-1" e_SR_2="-2" e_SR_3="-3" e_SR_4="-4" e_SR_5="-5" e_SR_6="-6" e_SR_7="-7" e_SR_8="-8" e_SR_9="-9" e_SR_10="-10" e_SR_11="-11" e_SR_12="-12" e_SR_13="-13" e_SR_14="-14" e_SR_15="-15" e_SR_1l="1" e_SR_2l="2" e_SR_3l="3" e_SR_4l="4" e_SR_5l="5" e_SR_6l="6" e_SR_7l="7" e_SR_8l="8" e_SR_9l="9" e_SR_10l="10" e_SR_11l="11" e_SR_12l="12" e_SR_13l="13" e_SR_14l="14" e_SR_15l="15", labsize(small))  xtitle(Lags of e_lgbt_SR) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white) 

graph export "graph_reg_2aE3_P.jpg", replace




* Reg 4 *
**************

forvalues p == 1/15 {
	xi: xtreg media_v e_SR_`p'l e_LR_`p'l i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe 
	eststo e_`p'l
	outreg2 using "e_`p'l.tex", append ctitle(Reg 4) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg media_v e_lgbt_SR e_lgbt_LR i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe    // ORIGINAL
	eststo e_lgbt
	outreg2 using "e_lgbt.tex",  append ctitle(Reg 4) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg media_v e_SR_`p' e_LR_`p' i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe 
	eststo e_`p'
	outreg2 using "e_`p'.tex", append ctitle(Reg 4) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}


* Figure A4 (d) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2csprtcpt v2clacjstw e_LR_15 e_LR_14 e_LR_13 e_LR_12 e_LR_11 e_LR_10 e_LR_9 e_LR_8 e_LR_7 e_LR_6 e_LR_5 e_LR_4 e_LR_3 e_LR_2 e_LR_1 e_lgbt_LR e_LR_1l e_LR_2l e_LR_3l e_LR_4l e_LR_5l e_LR_6l e_LR_7l e_LR_8l e_LR_9l e_LR_10l e_LR_11l e_LR_12l e_LR_13l e_LR_14l e_LR_15l) nokey vertical yline(0) order(e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l ) coeflabels(e_lgbt_SR="0" e_SR_1 ="-1" e_SR_2="-2" e_SR_3="-3" e_SR_4="-4" e_SR_5="-5" e_SR_6="-6" e_SR_7="-7" e_SR_8="-8" e_SR_9="-9" e_SR_10="-10" e_SR_11="-11" e_SR_12="-12" e_SR_13="-13" e_SR_14="-14" e_SR_15="-15" e_SR_1l="1" e_SR_2l="2" e_SR_3l="3" e_SR_4l="4" e_SR_5l="5" e_SR_6l="6" e_SR_7l="7" e_SR_8l="8" e_SR_9l="9" e_SR_10l="10" e_SR_11l="11" e_SR_12l="12" e_SR_13l="13" e_SR_14l="14" e_SR_15l="15", labsize(small))  xtitle(Lags of e_lgbt_SR) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)  

graph export "graph_reg_2aE4_SR_P.jpg", replace


* Figure A5 (a) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2csprtcpt v2clacjstw e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l) nokey vertical yline(0) order(e_LR_15 e_LR_14 e_LR_13 e_LR_12 e_LR_11 e_LR_10 e_LR_9 e_LR_8 e_LR_7 e_LR_6 e_LR_5 e_LR_4 e_LR_3 e_LR_2 e_LR_1 e_lgbt_LR e_LR_1l e_LR_2l e_LR_3l e_LR_4l e_LR_5l e_LR_6l e_LR_7l e_LR_8l e_LR_9l e_LR_10l e_LR_11l e_LR_12l e_LR_13l e_LR_14l e_LR_15l ) coeflabels(e_lgbt_LR="0" e_LR_1 ="-1" e_LR_2="-2" e_LR_3="-3" e_LR_4="-4" e_LR_5="-5" e_LR_6="-6" e_LR_7="-7" e_LR_8="-8" e_LR_9="-9" e_LR_10="-10" e_LR_11="-11" e_LR_12="-12" e_LR_13="-13" e_LR_14="-14" e_LR_15="-15" e_LR_1l="1" e_LR_2l="2" e_LR_3l="3" e_LR_4l="4" e_LR_5l="5" e_LR_6l="6" e_LR_7l="7" e_LR_8l="8" e_LR_9l="9" e_LR_10l="10" e_LR_11l="11" e_LR_12l="12" e_LR_13l="13" e_LR_14l="14" e_LR_15l="15", labsize(small))  xtitle(Lags of e_lgbt_LR) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)

graph export "graph_reg_2aE4_LR_P.jpg", replace




* Reg 5 *
**************

forvalues p == 1/15 {
	xi: xtreg media_v e_SR_`p'l e_LR_`p'l i.month_id v2x_freexp_altinf v2x_gencs, fe 
	eststo e_`p'l
	outreg2 using "e_`p'l.tex", append ctitle(Reg 5) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg media_v e_lgbt_SR e_lgbt_LR i.month_id v2x_freexp_altinf v2x_gencs, fe    // ORIGINAL
	eststo e_lgbt
	outreg2 using "e_lgbt.tex",  append ctitle(Reg 5) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg media_v e_SR_`p' e_LR_`p' i.month_id v2x_freexp_altinf v2x_gencs, fe 
	eststo e_`p'
	outreg2 using "e_`p'.tex", append ctitle(Reg 5) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}

* Figure A4 (e) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs e_LR_15 e_LR_14 e_LR_13 e_LR_12 e_LR_11 e_LR_10 e_LR_9 e_LR_8 e_LR_7 e_LR_6 e_LR_5 e_LR_4 e_LR_3 e_LR_2 e_LR_1 e_lgbt_LR e_LR_1l e_LR_2l e_LR_3l e_LR_4l e_LR_5l e_LR_6l e_LR_7l e_LR_8l e_LR_9l e_LR_10l e_LR_11l e_LR_12l e_LR_13l e_LR_14l e_LR_15l) nokey vertical yline(0) order(e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l ) coeflabels(e_lgbt_SR="0" e_SR_1 ="-1" e_SR_2="-2" e_SR_3="-3" e_SR_4="-4" e_SR_5="-5" e_SR_6="-6" e_SR_7="-7" e_SR_8="-8" e_SR_9="-9" e_SR_10="-10" e_SR_11="-11" e_SR_12="-12" e_SR_13="-13" e_SR_14="-14" e_SR_15="-15" e_SR_1l="1" e_SR_2l="2" e_SR_3l="3" e_SR_4l="4" e_SR_5l="5" e_SR_6l="6" e_SR_7l="7" e_SR_8l="8" e_SR_9l="9" e_SR_10l="10" e_SR_11l="11" e_SR_12l="12" e_SR_13l="13" e_SR_14l="14" e_SR_15l="15", labsize(small)) xtitle(Lags of e_lgbt_SR) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)  

graph export "graph_reg_2aE5_SR_P.jpg", replace


* Figure A5 (b) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l) nokey vertical yline(0) order(e_LR_15 e_LR_14 e_LR_13 e_LR_12 e_LR_11 e_LR_10 e_LR_9 e_LR_8 e_LR_7 e_LR_6 e_LR_5 e_LR_4 e_LR_3 e_LR_2 e_LR_1 e_lgbt_LR e_LR_1l e_LR_2l e_LR_3l e_LR_4l e_LR_5l e_LR_6l e_LR_7l e_LR_8l e_LR_9l e_LR_10l e_LR_11l e_LR_12l e_LR_13l e_LR_14l e_LR_15l ) coeflabels(e_lgbt_LR="0" e_LR_1 ="-1" e_LR_2="-2" e_LR_3="-3" e_LR_4="-4" e_LR_5="-5" e_LR_6="-6" e_LR_7="-7" e_LR_8="-8" e_LR_9="-9" e_LR_10="-10" e_LR_11="-11" e_LR_12="-12" e_LR_13="-13" e_LR_14="-14" e_LR_15="-15" e_LR_1l="1" e_LR_2l="2" e_LR_3l="3" e_LR_4l="4" e_LR_5l="5" e_LR_6l="6" e_LR_7l="7" e_LR_8l="8" e_LR_9l="9" e_LR_10l="10" e_LR_11l="11" e_LR_12l="12" e_LR_13l="13" e_LR_14l="14" e_LR_15l="15", labsize(small)) xtitle(Lags of e_lgbt_LR) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)  

graph export "graph_reg_2aE5_LR_P.jpg", replace




* Reg 6 *
**************

forvalues p == 1/15 {
	xi: xtreg media_v e_SR_`p'l e_LR_`p'l i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe 
	eststo e_`p'l
	outreg2 using "e_`p'l.tex", append ctitle(Reg 6) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg media_v e_lgbt_SR e_lgbt_LR i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe    // ORIGINAL
	eststo e_lgbt
	outreg2 using "e_lgbt.tex",  append ctitle(Reg 6) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg media_v e_SR_`p' e_LR_`p' i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe 
	eststo e_`p'
	outreg2 using "e_`p'.tex", append ctitle(Reg 6) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}

* Figure A4 (f) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs v2x_clphy e_LR_15 e_LR_14 e_LR_13 e_LR_12 e_LR_11 e_LR_10 e_LR_9 e_LR_8 e_LR_7 e_LR_6 e_LR_5 e_LR_4 e_LR_3 e_LR_2 e_LR_1 e_lgbt_LR e_LR_1l e_LR_2l e_LR_3l e_LR_4l e_LR_5l e_LR_6l e_LR_7l e_LR_8l e_LR_9l e_LR_10l e_LR_11l e_LR_12l e_LR_13l e_LR_14l e_LR_15l) nokey vertical yline(0) order(e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l ) coeflabels(e_lgbt_SR="0" e_SR_1 ="-1" e_SR_2="-2" e_SR_3="-3" e_SR_4="-4" e_SR_5="-5" e_SR_6="-6" e_SR_7="-7" e_SR_8="-8" e_SR_9="-9" e_SR_10="-10" e_SR_11="-11" e_SR_12="-12" e_SR_13="-13" e_SR_14="-14" e_SR_15="-15" e_SR_1l="1" e_SR_2l="2" e_SR_3l="3" e_SR_4l="4" e_SR_5l="5" e_SR_6l="6" e_SR_7l="7" e_SR_8l="8" e_SR_9l="9" e_SR_10l="10" e_SR_11l="11" e_SR_12l="12" e_SR_13l="13" e_SR_14l="14" e_SR_15l="15", labsize(small))  xtitle(Lags of e_lgbt_SR) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)

graph export "graph_reg_2aE6_SR_P.jpg", replace


* Figure A5 (c) *
*****************

coefplot e_15l e_14l e_13l e_12l e_11l e_10l e_9l e_8l e_7l e_6l e_5l e_4l e_3l e_2l e_1l e_lgbt e_1 e_2 e_3 e_4 e_5 e_6 e_7 e_8 e_9 e_10 e_11 e_12 e_13 e_14 e_15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs v2x_clphy e_SR_15 e_SR_14 e_SR_13 e_SR_12 e_SR_11 e_SR_10 e_SR_9 e_SR_8 e_SR_7 e_SR_6 e_SR_5 e_SR_4 e_SR_3 e_SR_2 e_SR_1 e_lgbt_SR e_SR_1l e_SR_2l e_SR_3l e_SR_4l e_SR_5l e_SR_6l e_SR_7l e_SR_8l e_SR_9l e_SR_10l e_SR_11l e_SR_12l e_SR_13l e_SR_14l e_SR_15l) nokey vertical yline(0) order(e_LR_15 e_LR_14 e_LR_13 e_LR_12 e_LR_11 e_LR_10 e_LR_9 e_LR_8 e_LR_7 e_LR_6 e_LR_5 e_LR_4 e_LR_3 e_LR_2 e_LR_1 e_lgbt_LR e_LR_1l e_LR_2l e_LR_3l e_LR_4l e_LR_5l e_LR_6l e_LR_7l e_LR_8l e_LR_9l e_LR_10l e_LR_11l e_LR_12l e_LR_13l e_LR_14l e_LR_15l ) coeflabels(e_lgbt_LR="0" e_LR_1 ="-1" e_LR_2="-2" e_LR_3="-3" e_LR_4="-4" e_LR_5="-5" e_LR_6="-6" e_LR_7="-7" e_LR_8="-8" e_LR_9="-9" e_LR_10="-10" e_LR_11="-11" e_LR_12="-12" e_LR_13="-13" e_LR_14="-14" e_LR_15="-15" e_LR_1l="1" e_LR_2l="2" e_LR_3l="3" e_LR_4l="4" e_LR_5l="5" e_LR_6l="6" e_LR_7l="7" e_LR_8l="8" e_LR_9l="9" e_LR_10l="10" e_LR_11l="11" e_LR_12l="12" e_LR_13l="13" e_LR_14l="14" e_LR_15l="15", labsize(small))  xtitle(Lags of e_lgbt_LR) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)


graph export "graph_reg_2aE6_LR_P.jpg", replace
*/




**********************************************************************************************
***************** Placebo Test: Reverse Causality – Regression Group 1b **********************
************************* including Tables D61–D90; Figure A3 ********************************
*********************************************************************************************


	
use "LGBTQ_Activism_and_Backlash_extended", clear  // dta file generated above
drop if year == 2020 // for consistency across data sources
xtset coun_id month_id


* Reg 1 *
**************

forvalues p == 1/15 {
	xi: xtreg whc media_a_ld`p' i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe
	eststo m_ld`p'
	outreg2 using "media_a_ld`p'.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

	xi: xtreg whc media_a i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe    // ORIGINAL
	eststo m_lgbt
	outreg2 using "media_a.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg whc media_a_lg`p' i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe 
	eststo m_lg`p'
	outreg2 using "media_a_lg`p'.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}

* Figure A3 (a) *
*****************

coefplot m_ld15 m_ld14 m_ld13 m_ld12 m_ld11 m_ld10 m_ld9 m_ld8 m_ld7 m_ld6 m_ld5 m_ld4 m_ld3 m_ld2 m_ld1 m_lgbt m_lg1 m_lg2 m_lg3 m_lg4 m_lg5 m_lg6 m_lg7 m_lg8 m_lg9 m_lg10 m_lg11 m_lg12 m_lg13 m_lg14 m_lg15, drop(_Imonth_id* _cons v2x_freexp_altinf v2csprtcpt v2clacjstw) nokey vertical yline(0) order(media_a_ld15 media_a_ld14 media_a_ld13 media_a_ld12 media_a_ld11 media_a_ld10 media_a_ld9 media_a_ld8 media_a_ld7 media_a_ld6 media_a_ld5 media_a_ld4 media_a_ld3 media_a_ld2 media_a_ld1 media_a media_a_lg1 media_a_lg2 media_a_lg3 media_a_lg4 media_a_lg5 media_a_lg6 media_a_lg7 media_a_lg8 media_a_lg9 media_a_lg10 media_a_lg11 media_a_lg12 media_a_lg13 media_a_lg14 media_a_lg15 ) coeflabels(media_a="0" media_a_ld1 ="-1" media_a_ld2="-2" media_a_ld3="-3" media_a_ld4="-4" media_a_ld5="-5" media_a_ld6="-6" media_a_ld7="-7" media_a_ld8="-8" media_a_ld9="-9" media_a_ld10="-10" media_a_ld11="-11" media_a_ld12="-12" media_a_ld13="-13" media_a_ld14="-14" media_a_ld15="-15" media_a_lg1 ="1" media_a_lg2 ="2" media_a_lg3 ="3" media_a_lg4 ="4" media_a_lg5 ="5" media_a_lg6 ="6" media_a_lg7 ="7" media_a_lg8 ="8" media_a_lg9 ="9" media_a_lg10 ="10" media_a_lg11 ="11" media_a_lg12 ="12" media_a_lg13 ="13" media_a_lg14 ="14" media_a_lg15 ="15", labsize(small))  xtitle(Lags of media_a) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)

graph export "graph_reg_1bE1_P.jpg", replace




* Reg 2 *
**************

forvalues p == 1/15 {
	xi: xtreg whc media_a_ld`p' i.month_id v2x_freexp_altinf v2x_gencs, fe
	eststo m_ld`p'
	outreg2 using "media_a_ld`p'.tex", replace append ctitle(Reg 2) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

	xi: xtreg whc media_a i.month_id v2x_freexp_altinf v2x_gencs, fe    // ORIGINAL
	eststo m_lgbt
	outreg2 using "media_a.tex", replace append ctitle(Reg 2) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg whc media_a_lg`p' i.month_id v2x_freexp_altinf v2x_gencs, fe 
	eststo m_lg`p'
	outreg2 using "media_a_lg`p'.tex", replace append ctitle(Reg 2) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}


* Figure A3 (b) *
*****************

coefplot m_ld15 m_ld14 m_ld13 m_ld12 m_ld11 m_ld10 m_ld9 m_ld8 m_ld7 m_ld6 m_ld5 m_ld4 m_ld3 m_ld2 m_ld1 m_lgbt m_lg1 m_lg2 m_lg3 m_lg4 m_lg5 m_lg6 m_lg7 m_lg8 m_lg9 m_lg10 m_lg11 m_lg12 m_lg13 m_lg14 m_lg15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs) nokey vertical yline(0) order(media_a_ld15 media_a_ld14 media_a_ld13 media_a_ld12 media_a_ld11 media_a_ld10 media_a_ld9 media_a_ld8 media_a_ld7 media_a_ld6 media_a_ld5 media_a_ld4 media_a_ld3 media_a_ld2 media_a_ld1 media_a media_a_lg1 media_a_lg2 media_a_lg3 media_a_lg4 media_a_lg5 media_a_lg6 media_a_lg7 media_a_lg8 media_a_lg9 media_a_lg10 media_a_lg11 media_a_lg12 media_a_lg13 media_a_lg14 media_a_lg15 ) coeflabels(media_a="0" media_a_ld1 ="-1" media_a_ld2="-2" media_a_ld3="-3" media_a_ld4="-4" media_a_ld5="-5" media_a_ld6="-6" media_a_ld7="-7" media_a_ld8="-8" media_a_ld9="-9" media_a_ld10="-10" media_a_ld11="-11" media_a_ld12="-12" media_a_ld13="-13" media_a_ld14="-14" media_a_ld15="-15" media_a_lg1 ="1" media_a_lg2 ="2" media_a_lg3 ="3" media_a_lg4 ="4" media_a_lg5 ="5" media_a_lg6 ="6" media_a_lg7 ="7" media_a_lg8 ="8" media_a_lg9 ="9" media_a_lg10 ="10" media_a_lg11 ="11" media_a_lg12 ="12" media_a_lg13 ="13" media_a_lg14 ="14" media_a_lg15 ="15", labsize(small)) xtitle(Lags of media_a) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)

graph export "graph_reg_1bE2_P.jpg", replace




* Reg 3 *
**************

forvalues p == 1/15 {
	xi: xtreg whc media_a_ld`p' i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe
	eststo m_ld`p'
	outreg2 using "media_a_ld`p'.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

	xi: xtreg whc media_a i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe    // ORIGINAL
	eststo m_lgbt
	outreg2 using "media_a.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg whc media_a_lg`p' i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe 
	eststo m_lg`p'
	outreg2 using "media_a_lg`p'.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}

* Figure A3 (c) *
*****************

coefplot m_ld15 m_ld14 m_ld13 m_ld12 m_ld11 m_ld10 m_ld9 m_ld8 m_ld7 m_ld6 m_ld5 m_ld4 m_ld3 m_ld2 m_ld1 m_lgbt m_lg1 m_lg2 m_lg3 m_lg4 m_lg5 m_lg6 m_lg7 m_lg8 m_lg9 m_lg10 m_lg11 m_lg12 m_lg13 m_lg14 m_lg15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs v2x_clphy) nokey vertical yline(0) order(media_a_ld15 media_a_ld14 media_a_ld13 media_a_ld12 media_a_ld11 media_a_ld10 media_a_ld9 media_a_ld8 media_a_ld7 media_a_ld6 media_a_ld5 media_a_ld4 media_a_ld3 media_a_ld2 media_a_ld1 media_a media_a_lg1 media_a_lg2 media_a_lg3 media_a_lg4 media_a_lg5 media_a_lg6 media_a_lg7 media_a_lg8 media_a_lg9 media_a_lg10 media_a_lg11 media_a_lg12 media_a_lg13 media_a_lg14 media_a_lg15 ) coeflabels(media_a="0" media_a_ld1 ="-1" media_a_ld2="-2" media_a_ld3="-3" media_a_ld4="-4" media_a_ld5="-5" media_a_ld6="-6" media_a_ld7="-7" media_a_ld8="-8" media_a_ld9="-9" media_a_ld10="-10" media_a_ld11="-11" media_a_ld12="-12" media_a_ld13="-13" media_a_ld14="-14" media_a_ld15="-15" media_a_lg1 ="1" media_a_lg2 ="2" media_a_lg3 ="3" media_a_lg4 ="4" media_a_lg5 ="5" media_a_lg6 ="6" media_a_lg7 ="7" media_a_lg8 ="8" media_a_lg9 ="9" media_a_lg10 ="10" media_a_lg11 ="11" media_a_lg12 ="12" media_a_lg13 ="13" media_a_lg14 ="14" media_a_lg15 ="15", labsize(small))  xtitle(Lags of media_a) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white) 

graph export "graph_reg_1bE3_P.jpg", replace

*/




**********************************************************************************************
***************** Placebo Test: Reverse Causality – Regression Group 2b **********************
*********************** including Tables D91–D120; Figure A6 **********(**********************
*********************************************************************************************


	
use "LGBTQ_Activism_and_Backlash_extended", clear  // dta file generated above
xtset coun_id month_id


* Reg 1 *
**************

forvalues p == 1/15 {
	xi: xtreg media_v media_a_ld`p' i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe
	eststo m_ld`p'
	outreg2 using "media_a_ld`p'.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

	xi: xtreg media_v media_a i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe    // ORIGINAL
	eststo m_lgbt
	outreg2 using "media_a.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg media_v media_a_lg`p' i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe 
	eststo m_lg`p'
	outreg2 using "media_a_lg`p'.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}

* Figure A6 (a) *
*****************

coefplot m_ld15 m_ld14 m_ld13 m_ld12 m_ld11 m_ld10 m_ld9 m_ld8 m_ld7 m_ld6 m_ld5 m_ld4 m_ld3 m_ld2 m_ld1 m_lgbt m_lg1 m_lg2 m_lg3 m_lg4 m_lg5 m_lg6 m_lg7 m_lg8 m_lg9 m_lg10 m_lg11 m_lg12 m_lg13 m_lg14 m_lg15, drop(_Imonth_id* _cons v2x_freexp_altinf v2csprtcpt v2clacjstw) nokey vertical yline(0) order(media_a_ld15 media_a_ld14 media_a_ld13 media_a_ld12 media_a_ld11 media_a_ld10 media_a_ld9 media_a_ld8 media_a_ld7 media_a_ld6 media_a_ld5 media_a_ld4 media_a_ld3 media_a_ld2 media_a_ld1 media_a media_a_lg1 media_a_lg2 media_a_lg3 media_a_lg4 media_a_lg5 media_a_lg6 media_a_lg7 media_a_lg8 media_a_lg9 media_a_lg10 media_a_lg11 media_a_lg12 media_a_lg13 media_a_lg14 media_a_lg15 ) coeflabels(media_a="0" media_a_ld1 ="-1" media_a_ld2="-2" media_a_ld3="-3" media_a_ld4="-4" media_a_ld5="-5" media_a_ld6="-6" media_a_ld7="-7" media_a_ld8="-8" media_a_ld9="-9" media_a_ld10="-10" media_a_ld11="-11" media_a_ld12="-12" media_a_ld13="-13" media_a_ld14="-14" media_a_ld15="-15" media_a_lg1 ="1" media_a_lg2 ="2" media_a_lg3 ="3" media_a_lg4 ="4" media_a_lg5 ="5" media_a_lg6 ="6" media_a_lg7 ="7" media_a_lg8 ="8" media_a_lg9 ="9" media_a_lg10 ="10" media_a_lg11 ="11" media_a_lg12 ="12" media_a_lg13 ="13" media_a_lg14 ="14" media_a_lg15 ="15", labsize(small))  xtitle(Lags of media_a) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)

graph export "graph_reg_2bE1_P.jpg", replace




* Reg 2 *
**************

forvalues p == 1/15 {
	xi: xtreg media_v media_a_ld`p' i.month_id v2x_freexp_altinf v2x_gencs, fe
	eststo m_ld`p'
	outreg2 using "media_a_ld`p'.tex", replace append ctitle(Reg 2) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

	xi: xtreg media_v media_a i.month_id v2x_freexp_altinf v2x_gencs, fe    // ORIGINAL
	eststo m_lgbt
	outreg2 using "media_a.tex", replace append ctitle(Reg 2) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg media_v media_a_lg`p' i.month_id v2x_freexp_altinf v2x_gencs, fe 
	eststo m_lg`p'
	outreg2 using "media_a_lg`p'.tex", replace append ctitle(Reg 2) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}


* Figure A6 (b) *
*****************

coefplot m_ld15 m_ld14 m_ld13 m_ld12 m_ld11 m_ld10 m_ld9 m_ld8 m_ld7 m_ld6 m_ld5 m_ld4 m_ld3 m_ld2 m_ld1 m_lgbt m_lg1 m_lg2 m_lg3 m_lg4 m_lg5 m_lg6 m_lg7 m_lg8 m_lg9 m_lg10 m_lg11 m_lg12 m_lg13 m_lg14 m_lg15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs) nokey vertical yline(0) order(media_a_ld15 media_a_ld14 media_a_ld13 media_a_ld12 media_a_ld11 media_a_ld10 media_a_ld9 media_a_ld8 media_a_ld7 media_a_ld6 media_a_ld5 media_a_ld4 media_a_ld3 media_a_ld2 media_a_ld1 media_a media_a_lg1 media_a_lg2 media_a_lg3 media_a_lg4 media_a_lg5 media_a_lg6 media_a_lg7 media_a_lg8 media_a_lg9 media_a_lg10 media_a_lg11 media_a_lg12 media_a_lg13 media_a_lg14 media_a_lg15 ) coeflabels(media_a="0" media_a_ld1 ="-1" media_a_ld2="-2" media_a_ld3="-3" media_a_ld4="-4" media_a_ld5="-5" media_a_ld6="-6" media_a_ld7="-7" media_a_ld8="-8" media_a_ld9="-9" media_a_ld10="-10" media_a_ld11="-11" media_a_ld12="-12" media_a_ld13="-13" media_a_ld14="-14" media_a_ld15="-15" media_a_lg1 ="1" media_a_lg2 ="2" media_a_lg3 ="3" media_a_lg4 ="4" media_a_lg5 ="5" media_a_lg6 ="6" media_a_lg7 ="7" media_a_lg8 ="8" media_a_lg9 ="9" media_a_lg10 ="10" media_a_lg11 ="11" media_a_lg12 ="12" media_a_lg13 ="13" media_a_lg14 ="14" media_a_lg15 ="15", labsize(small)) xtitle(Lags of media_a) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)

graph export "graph_reg_2bE2_P.jpg", replace




* Reg 3 *
**************

forvalues p == 1/15 {
	xi: xtreg media_v media_a_ld`p' i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe
	eststo m_ld`p'
	outreg2 using "media_a_ld`p'.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

	xi: xtreg media_v media_a i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe    // ORIGINAL
	eststo m_lgbt
	outreg2 using "media_a.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
	
	xi: xtreg media_v media_a_lg`p' i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe 
	eststo m_lg`p'
	outreg2 using "media_a_lg`p'.tex", replace append ctitle(Reg 1) drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)
}

* Figure A6 (c) *
*****************

coefplot m_ld15 m_ld14 m_ld13 m_ld12 m_ld11 m_ld10 m_ld9 m_ld8 m_ld7 m_ld6 m_ld5 m_ld4 m_ld3 m_ld2 m_ld1 m_lgbt m_lg1 m_lg2 m_lg3 m_lg4 m_lg5 m_lg6 m_lg7 m_lg8 m_lg9 m_lg10 m_lg11 m_lg12 m_lg13 m_lg14 m_lg15, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs v2x_clphy) nokey vertical yline(0) order(media_a_ld15 media_a_ld14 media_a_ld13 media_a_ld12 media_a_ld11 media_a_ld10 media_a_ld9 media_a_ld8 media_a_ld7 media_a_ld6 media_a_ld5 media_a_ld4 media_a_ld3 media_a_ld2 media_a_ld1 media_a media_a_lg1 media_a_lg2 media_a_lg3 media_a_lg4 media_a_lg5 media_a_lg6 media_a_lg7 media_a_lg8 media_a_lg9 media_a_lg10 media_a_lg11 media_a_lg12 media_a_lg13 media_a_lg14 media_a_lg15 ) coeflabels(media_a="0" media_a_ld1 ="-1" media_a_ld2="-2" media_a_ld3="-3" media_a_ld4="-4" media_a_ld5="-5" media_a_ld6="-6" media_a_ld7="-7" media_a_ld8="-8" media_a_ld9="-9" media_a_ld10="-10" media_a_ld11="-11" media_a_ld12="-12" media_a_ld13="-13" media_a_ld14="-14" media_a_ld15="-15" media_a_lg1 ="1" media_a_lg2 ="2" media_a_lg3 ="3" media_a_lg4 ="4" media_a_lg5 ="5" media_a_lg6 ="6" media_a_lg7 ="7" media_a_lg8 ="8" media_a_lg9 ="9" media_a_lg10 ="10" media_a_lg11 ="11" media_a_lg12 ="12" media_a_lg13 ="13" media_a_lg14 ="14" media_a_lg15 ="15", labsize(small))  xtitle(Lags of media_a) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white) 

graph export "graph_reg_2bE3_P.jpg", replace

*/




**********************************************************************************************
******************** Placebo Test: Heterogeneous Treatment Effects  **************************
******************* Generating Different Durations for Event Dummy ***************************
*********************************************************************************************


use "LGBTQ_Activism_and_Backlash", clear 
drop e_lgbt


gen e_lgbt = 0
replace e_lgbt = 1 if coun_name != "Russia" 
	
	
forvalues T = 1/60 {
	gen e_lgbt_`T' = 0
		replace e_lgbt_`T' = 1 if (coun_name == "Georgia" | coun_name == "Armenia") & inrange(month_id,29,28+`T')
		replace e_lgbt_`T' = 1 if (coun_name == "Kyrgyzstan") &  inrange(month_id,39,38+`T')
		replace e_lgbt_`T' = 1 if (coun_name == "Ukraine" | coun_name == "Moldova") & inrange(month_id,18,17+`T')
		replace e_lgbt_`T' = 1 if (coun_name == "Bosnia and Herzegovina" | coun_name == "Serbia") & inrange(month_id,21,20+`T') 
		replace e_lgbt_`T' = 1 if (coun_name == "Poland" | coun_name == "Germany") & inrange(month_id,30,29+`T')
}
order media_v e_lgbt e_lgbt_1-e_lgbt_60, a(month_id)
*/

save "LGBTQ_Activism_and_Backlash_extended2", replace


**********************************************************************************************
***************** Placebo Test: Heterogeneous TE – Regression Group 1a ***********************
************************ including Tables D121–168; Figure A7 ********************************
*********************************************************************************************

	
save "LGBTQ_Activism_and_Backlash_extended2", replace // dta file generated in previous section
drop if year == 2020 // for consistency across data sources
xtset coun_id month_id


global tvars_d D_1 D_2 D_3 D_4 D_5 D_6 D_7 D_8 D_9 D_10 D_11 D_12 D_13 D_14 D_15 D_16 D_17 D_18 D_19 D_20 D_21 D_22 D_23 D_24 D_25 D_26 D_27 D_28 D_29 D_30 D_31 D_32 D_33 D_34 D_35 D_36 D_37 D_38 D_39 D_40 D_41 D_42 D_43 D_44 D_45 D_46 D_47 D_48
global tvars_e E_1 E_2 E_3 E_4 E_5 E_6 E_7 E_8 E_9 E_10 E_11 E_12 E_13 E_14 E_15 E_16 E_17 E_18 E_19 E_20 E_21 E_22 E_23 E_24 E_25 E_26 E_27 E_28 E_29 E_30 E_31 E_32 E_33 E_34 E_35 E_36 E_37 E_38 E_39 E_40 E_41 E_42 E_43 E_44 E_45 E_46 E_47 E_48
global tvars_f F_1 F_2 F_3 F_4 F_5 F_6 F_7 F_8 F_9 F_10 F_11 F_12 F_13 F_14 F_15 F_16 F_17 F_18 F_19 F_20 F_21 F_22 F_23 F_24 F_25 F_26 F_27 F_28 F_29 F_30 F_31 F_32 F_33 F_34 F_35 F_36 F_37 F_38 F_39 F_40 F_41 F_42 F_43 F_44 F_45 F_46 F_47 F_48


forvalues T = 1/48 {	
	
	* Reg 1 *
	**************
	xi: xtreg whc e_lgbt_`T' i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe
	eststo D_`T'
	outreg2 using "reg_1a_`T'.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

		
	* Reg 2 *
	**************
	xi: xtreg whc e_lgbt_`T' i.month_id v2x_freexp_altinf v2x_gencs, fe
	eststo E_`T'
	outreg2 using "reg_1a_`T'.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)


	* Reg 3 *
	**************
	xi: xtreg whc e_lgbt_`T' i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe
	eststo F_`T'
	outreg2 using "reg_1a_`T'.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES) alpha(0.01, 0.05, 0.10)
}


* Figure A7 (a)–(c) *
**********************
		
coefplot $tvars_d, drop(_Imonth_id* _cons v2x_freexp_altinf v2csprtcpt v2clacjstw) nokey vertical yline(0) order(D_1-D_48) coeflabels(D_`T' = "`T'", labsize(small)) xlabel(0(4)48) xtitle(T Months Following Event) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white) 

graph export "graph_reg_1a1_T.jpg", replace


coefplot $tvars_e, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs) nokey vertical yline(0) order(E_1-E_48) coeflabels(E_`T' = "`T'", labsize(small)) xlabel(0(4)48) xtitle(T Months Following Event) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white) 

graph export "graph_reg_1a2_T.jpg", replace

		
coefplot $tvars_f, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs v2x_clphy) nokey vertical yline(0) order(F_1-F_48) coeflabels(F_`T' = "`T'", labsize(small)) xlabel(0(4)48)  xtitle(T Months Following Event) ytitle(whc) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white) 

graph export "graph_reg_1a3_T.jpg", replace
*/




**********************************************************************************************
***************** Placebo Test: Heterogeneous TE – Regression Group 2a ***********************
************************ including Tables D169–228; Figure A8 ********************************
*********************************************************************************************

	
save "LGBTQ_Activism_and_Backlash_extended2", replace // dta file generated above
xtset coun_id month_id


global tvars_d D_1 D_2 D_3 D_4 D_5 D_6 D_7 D_8 D_9 D_10 D_11 D_12 D_13 D_14 D_15 D_16 D_17 D_18 D_19 D_20 D_21 D_22 D_23 D_24 D_25 D_26 D_27 D_28 D_29 D_30 D_31 D_32 D_33 D_34 D_35 D_36 D_37 D_38 D_39 D_40 D_41 D_42 D_43 D_44 D_45 D_46 D_47 D_48 D_49 D_50 D_51 D_52 D_53 D_54 D_55 D_56 D_57 D_58 D_59 D_60
global tvars_e E_1 E_2 E_3 E_4 E_5 E_6 E_7 E_8 E_9 E_10 E_11 E_12 E_13 E_14 E_15 E_16 E_17 E_18 E_19 E_20 E_21 E_22 E_23 E_24 E_25 E_26 E_27 E_28 E_29 E_30 E_31 E_32 E_33 E_34 E_35 E_36 E_37 E_38 E_39 E_40 E_41 E_42 E_43 E_44 E_45 E_46 E_47 E_48 E_49 E_50 E_51 E_52 E_53 E_54 E_55 E_56 E_57 E_58 E_59 E_60
global tvars_f F_1 F_2 F_3 F_4 F_5 F_6 F_7 F_8 F_9 F_10 F_11 F_12 F_13 F_14 F_15 F_16 F_17 F_18 F_19 F_20 F_21 F_22 F_23 F_24 F_25 F_26 F_27 F_28 F_29 F_30 F_31 F_32 F_33 F_34 F_35 F_36 F_37 F_38 F_39 F_40 F_41 F_42 F_43 F_44 F_45 F_46 F_47 F_48 F_49 F_50 F_51 F_52 F_53 F_54 F_55 F_56 F_57 F_58 F_59 F_60


forvalues T = 1/60 {	
	
	* Reg 1 *
	**************
	xi: xtreg media_v e_lgbt_`T' i.month_id v2x_freexp_altinf v2csprtcpt v2clacjstw, fe
	eststo D_`T'
	outreg2 using "reg_2a_`T'.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)

		
	* Reg 2 *
	**************
	xi: xtreg media_v e_lgbt_`T' i.month_id v2x_freexp_altinf v2x_gencs, fe
	eststo E_`T'
	outreg2 using "reg_2a_`T'.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES)


	* Reg 3 *
	**************
	xi: xtreg media_v e_lgbt_`T' i.month_id v2x_freexp_altinf v2x_gencs v2x_clphy, fe
	eststo F_`T'
	outreg2 using "reg_2a_`T'.tex", drop(_Imonth_id*) addtext(Fixed Effects, YES, Media, YES, Civil Society, YES, Women, YES) alpha(0.01, 0.05, 0.10)
}


* Figure A8 (a)–(c) *
**********************
		
coefplot $tvars_d, drop(_Imonth_id* _cons v2x_freexp_altinf v2csprtcpt v2clacjstw) nokey vertical yline(0) order(D_1-D_60) coeflabels(D_`T' = "`T'", labsize(small)) xlabel(0(4)60) xtitle(T Months Following Event) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)

graph export "graph_reg_2a1_T.jpg", replace


coefplot $tvars_e, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs) nokey vertical yline(0) order(E_1-E_60) coeflabels(E_`T' = "`T'", labsize(small)) xlabel(0(4)60) xtitle(T Months Following Event) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)

graph export "graph_reg_2a2_T.jpg", replace

		
coefplot $tvars_f, drop(_Imonth_id* _cons v2x_freexp_altinf v2x_gencs v2x_clphy) nokey vertical yline(0) order(F_1-F_60) coeflabels(F_`T' = "`T'", labsize(small)) xlabel(0(4)60)  xtitle(T Months Following Event) ytitle(media_v) levels(99 95 90) ciopts(recast(. rcap))  mlabel(cond(@pval<.01, "**", cond(@pval<.05, "*", cond(@pval<.10, "º", "")))) graphregion(col(white)) bgcol(white)

graph export "graph_reg_2a3_T.jpg", replace
*/
